package com.horse.pack.common.exception;

import com.horse.pack.common.enums.ServerCode;

/**
 * @author yangliu
 * @date 2024/3/22 12:08 PM
 */
public class NormalException extends CommonException {

    public NormalException(ServerCode serverCodeEnum, Object... args) {
        this(serverCodeEnum.getCode(), serverCodeEnum.getMsg(), args);
    }


    public NormalException(Integer code, String message, Object... args) {
        super(code, message);
        this.args = args;
    }

    public static NormalException code(ServerCode serverCodeEnum, Object... args) {
        return new NormalException(serverCodeEnum, args);
    }

    public static NormalException code(Integer code, String message, Object... args) {
        return new NormalException(code, message, args);
    }


}
